#include "caltime.h"

// the funtions bodies for time calculating
void getdif(){
	QueryPerformanceFrequency(&larger_integer);//获得时钟频率
	dff = larger_integer.QuadPart;
}

long long getcur(){
	QueryPerformanceCounter(&larger_integer);//查询性能计数器，获得初始值
	return larger_integer.QuadPart;
}

void Start(){
    c1=getcur();
}

void End(){
    c2=getcur();
}

double Cal_it(){
    getdif();
    return (c2-c1)/dff*1000;
}
//